package com.css.dzj.dzjportal.modules.interflow.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * 公众交流实体类
 * @author wt
 * @date 2020\3\10 0010
 */
@Entity
@Table(name = "AL_INTERFLOW", schema = "DZJPORTAL", catalog = "")
public class AlInterflowEntity {
    //主键
    private String id;
    //创建时间
    private Date createTime;
    //更新时间
    private Date updateTime;
    //修改人
    private String updateUser;
    //删除标识，0位未删除，1为已删除
    private String delFlag;
    //创建人
    private String createUser;
    //姓名
    private String flowName;
    //联系电话
    private String flowPhone;
    //通讯地址
    private String flowAddress;
    //咨询/建议内容
    private String flowSuggest;
    //留言时间
    private Date leaveTime;
    //处理状态
    private String statte;
    //反馈详情
    private String feedbackDetail;
    //反馈时间
    private Date feedbackTime;

    @Id
    @Column(name = "Id")
//    @GeneratedValue(generator = "idGenerator")
//    @GenericGenerator(name = "idGenerator", strategy = "com.css.dzj.dzjportal.common.util.SnowflakeId")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "create_Time")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm",timezone="GMT+8")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "update_Time")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm",timezone="GMT+8")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "update_User")
    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    @Basic
    @Column(name = "del_Flag")
    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Basic
    @Column(name = "create_User")
    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    @Basic
    @Column(name = "flow_Name")
    public String getFlowName() {
        return flowName;
    }

    public void setFlowName(String flowName) {
        this.flowName = flowName;
    }

    @Basic
    @Column(name = "flow_Phone")
    public String getFlowPhone() {
        return flowPhone;
    }

    public void setFlowPhone(String flowPhone) {
        this.flowPhone = flowPhone;
    }

    @Basic
    @Column(name = "flow_Address")
    public String getFlowAddress() {
        return flowAddress;
    }

    public void setFlowAddress(String flowAddress) {
        this.flowAddress = flowAddress;
    }

    @Basic
    @Column(name = "flow_Suggest")
    public String getFlowSuggest() {
        return flowSuggest;
    }

    public void setFlowSuggest(String flowSuggest) {
        this.flowSuggest = flowSuggest;
    }

    @Basic
    @Column(name = "leave_Time")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getLeaveTime() {
        return leaveTime;
    }

    public void setLeaveTime(Date leaveTime) {
        this.leaveTime = leaveTime;
    }

    @Basic
    @Column(name = "statte")
    public String getStatte() {
        return statte;
    }

    public void setStatte(String statte) {
        this.statte = statte;
    }

    @Basic
    @Column(name = "feedback_Detail")
    public String getFeedbackDetail() {
        return feedbackDetail;
    }

    public void setFeedbackDetail(String feedbackDetail) {
        this.feedbackDetail = feedbackDetail;
    }

    @Basic
    @Column(name = "feedback_Time")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getFeedbackTime() {
        return feedbackTime;
    }

    public void setFeedbackTime(Date feedbackTime) {
        this.feedbackTime = feedbackTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AlInterflowEntity that = (AlInterflowEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(updateTime, that.updateTime) &&
                Objects.equals(updateUser, that.updateUser) &&
                Objects.equals(delFlag, that.delFlag) &&
                Objects.equals(createUser, that.createUser) &&
                Objects.equals(flowName, that.flowName) &&
                Objects.equals(flowPhone, that.flowPhone) &&
                Objects.equals(flowAddress, that.flowAddress) &&
                Objects.equals(flowSuggest, that.flowSuggest) &&
                Objects.equals(leaveTime, that.leaveTime) &&
                Objects.equals(statte, that.statte) &&
                Objects.equals(feedbackDetail, that.feedbackDetail) &&
                Objects.equals(feedbackTime, that.feedbackTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, createTime, updateTime, updateUser, delFlag, createUser, flowName, flowPhone, flowAddress, flowSuggest, leaveTime, statte, feedbackDetail, feedbackTime);
    }
}
